Criminal Lawyers in Spain

  • Alvaro
    Alvaro is an experienced lawyer who has been assisting expats and visitors to Spain with their legal issues since 2011. He deals with both criminal and civil law matters, specifically property, probate and family law. He is also a member of the Association of Family Lawyers of Spain.
    Visit profile page
    Testimonials for Criminal Law service
    • Alan Ragsdale
      Alan Ragsdale, Fuengirola

      Very experienced and professional. Could not do enough to help us with the matter in hand.


      Would recommend this lawyer to everyone. Great service thanks!


      Sep 21, 2019
    • K K
      K K, Fuengirola

      Alvaro made one phone call on our behalf and sorted out a long standing issue with a rental agency in Fuengirola. Without his help we would have been lost.


      Would absolutely recommend him, he understood the issue and dealt with it efficiently.


      Sep 18, 2019
    • Tina Shiels
      Tina Shiels, Fuengirola

      Alvaro was very helpful and went above and beyond to try to help me in my situation as I needed it to happen as fast as possible.


      Even whilst he was on holiday he was in touch and made things happen. would definitely recommend!


      Sep 06, 2019
    • Lorrainne Morgan
      Lorrainne Morgan, Fuengirola

      Nothing was too much for Alvaro. He made sure we got exactly what we asked for. Couldn’t be happier.


      Aug 08, 2019
    • Davinia Gordon
      Davinia Gordon, Malaga

      Very satisfied with the service provided!


      Jul 31, 2019
    • Jason McNabb
      Jason McNabb, Fuengirola

      Very professional and a first class service at very short notice.


      Everything was under control in a short space of time. Alvaro was a man of his word. Anything he said he would do he done it. Me and my family appreciate everything you done for my brother thank you so much.


      Jul 16, 2019
    • Andy Docksey
      Andy Docksey, La Cala de Mijas

      Alvaro is very professional, he is very polite and helpful, he responds very quickly and I would definitely use his service again and recommend him to others.


      Jul 08, 2019
    • Simon Luddon
      Simon Luddon , Alicante

      This is the fourth time I have used this company I would not look elsewhere, their service is second to none.


      Jul 08, 2019
    • Colin Taplin
      Colin Taplin, Fuengirola

      Alvaro quickly got to grip with our issues.


      He explained things clearly and we feel that he was good value for money.


      Jul 01, 2019
    • Dave Holmes
      Dave Holmes, Fuengirola

      Very prompt reply to my original email. Alvaro is extremely professional & understanding.


      I would recommend Alvaro to anyone who needs legal help in Spain


      Jun 25, 2019
    • Michael Ha
      Michael Ha, Fuengirola

      Very helpful and informative, thank you Alvaro


      Jun 24, 2019
    • Brenda Ann Tillson Phillips
      Brenda Ann Tillson Phillips, Fuengirola

      I can highly recommend Advocate Abroad. When I rang them I was immediately put in touch with the right solicitor for my case, Alvaro. He dealt with the case efficiently giving me regular updates and giving me comfort that we would get the problem sorted.


      May 31, 2019
    • Jeffrey Gorman
      Jeffrey Gorman, Granada

      Always available and ready to help, nice guy easy to talk to.


      May 31, 2019
    • Don Sierra
      Don Sierra, Granada

      It is very difficult to find a good Spanish lawyer and this law firm, has set the standard very high.


      I sent them an email and within an hour someone called me and got on my case. Álvaro, was a shark and he got the job done. No waiting, no bs, straight to the point.


      As an American EXPAT it is very important not to be manipulated by the Spanish Court system. He showed me some amazing loopholes and now, things are going great!


      May 28, 2019
    • Andy and Diane Heston
      Andy and Diane Heston, Fuengirola

      We have recently had to employ the services of a lawyer, to deal with a very serious and distressing problem. We found Alvero and made a phone call to him ,within seconds of speaking to him he proved to be the lawyer to represent us.


      His knowledge of our particular problem was in depth and precise he listened carefully and gave us really sound and honest advice. His professionalism in handling our case has been impressive to say the least but he has also remained sympathetic and constantly kept us up to date with everything he has been doing at every stage.


      This has helped to minimize the stress at this extremely stressful time I would have no hesitation in recommending Alvero. His professionalism and whole attitude towards his clients is second to none


      May 24, 2019
    • Max Henchy
      Max Henchy, Puerto Banus- Estepona

      He was very professional and extremely helpful! Also incredibly quick and efficient.


      Thanks to him my life has changed drastically for the better! He went out of his way to help me and my family.


      May 24, 2019
    • Angela Panuccio
      Angela Panuccio, Granada

      Alvaro was extremely helpful. I would recommend his services to others.


      May 23, 2019
    • Rachael Barber
      Rachael Barber, Granada

      Alvaro was an excellent advocate. He was always available and very helpful. His English is excellent as well.


      Highly recommend working with him to anyone :)


      Mar 20, 2019
    • Justin Culmer
      Justin Culmer, United Kingdom

      Alvaro was professional, approachable, and very responsive while supporting me with the formal and legal processes in assisting me purchasing my new home in Spain.


      He was consistent in all communication and very informative.


      To improve the service I would suggest to provide a formal summary document of all legal services and formality checks carried out on the property purchase process, (as done in the UK) as a final overall document given to the client.


      Mar 14, 2019
    • Jason Baker
      Jason Baker, Estepona

      Alvaro was transparent throughout the process and instilled a confidence in me that he would get the job done, which he duly did!


      He was persistent and diligent with his approach, which meant that an issue that i had for 2 years was no longer one.


      Regarding the above KPI's of measurement, he was top marks for all of them. I am genuinely satisfied with the service.


      Feb 13, 2019
    • Alison Hamilton
      Alison Hamilton, Fuengirola

      Kept us informed every step of the way, very efficient and very pro active.


      Absolutely excellent!


      Feb 12, 2019
    • Florence
      Florence, Fuengirola

      The service was quick and satisfactory. I was impressed by the lawyer's work. Very professional, easy going and communicative. Everything was perfect!


      Jan 08, 2019
    • David W Baker
      David W Baker, Malaga

      We were extremely satisfied with Alvaro: He explained the law to us and gave us a solution to our problem.


      He could not have been more helpful and we will definitely use him again.


      Nov 06, 2018
    • Michele Jansen van Vuuren
      Michele Jansen van Vuuren, Benajarafe

      Alvaro was extremely helpful, he couldn't have done more. Very quick to respond to my query.


      Only issue was that some of the documents I needed to provide were not mentioned. However, would definitely recommend his services to friends.


      Oct 13, 2018
    • David McChesney
      David McChesney, Puerto Banus

      Alvaro was very professional, Knowledgeable of the subject at hand, did not over-charge - in fact cut costs in the best way for me.


      Very efficient in the entire process. Thank you.


      Oct 03, 2018
    • Patsy Valentin
      Patsy Valentin, Granada

      Extremely accommodating and highly professional and very pro active. Excellent result and service. Highly recommended.


      Sep 11, 2018
    • Jovie
      Jovie, Malaga

      My lawyer Alvaro was extremely helpful and very efficient. I would definitely recommend his services to friends.


      Sep 05, 2018
    • Claire
      Claire, Fuengirola

      Alvaro assisted me during my experience at advocate abroad, and he was so kind. He answered any questions I had, and made me feel completely at ease.


      I knew I was in the hands of a professional. He could not have done more to help me.


      Jul 04, 2018
    • Paul and Joyce Rose
      Paul and Joyce Rose, Mijas, Malaga

      Extremely helpful and very professional. Will definitely use Alvaro next time we require legal advice.


      Jul 04, 2018
    • Claire O'Gara
      Claire O'Gara, Fuengirola

      I liked Alvaroós enthusiasm, and the great level of customer service. He always answered my questions thoroughly.


      Jun 27, 2018
    • David Pratt (Fuengirola)
      David Pratt (Fuengirola)

      Alvaro was helpful and knowledgeable. My problem was solved rapidly and effectively.


      May 04, 2018
    • David Pratt
      David Pratt, Alhaurin del Grande

      Alvaro gives me confidence that he understands the issue and gives me practical solutions. He works rapidly and efficiently. I would strongly recommend his services.


      Apr 13, 2018
    • Phil Loughton
      Phil Loughton, Las Lagunas de Mijas

      Alvaro was extremely helpful and the simple process I needed managed was dealt with quickly and efficiently. I would certainly recommend him to friends.


      Mar 20, 2018
    • John Burchell
      John Burchell, Arroyo De la Miel

      Alvaro was very professional, helpful and friendly.


      Understood things quickly. Explained things well in English. Very easy to contact at any time.


      Mar 20, 2018
    • Tony
      Tony, London

      The service I received from nada was very helpful.


      The tasks were completed to the highest standard and would definitely use her services again in the future. All correspondence was received in a very timely manner. Highly recommended.


      Feb 28, 2018
    • Peter Brumder
      Peter Brumder, England

      Alvaro has always been very approachable and friendly and I value his judgement and advice.


      Alvaro has taken away the headaches associated with a property abroad and has helped me with all my problems including payment of bills, decorating and taxes.


      I couldn't have coped without him


      Oct 04, 2017
    • SRK
      SRK, Malaga

      We appointed Alvaro for a local business purchase. We would have to say he was extremely thorough and efficient in his workings, very approachable and his response time to queries was typically minutes from e-mails/messages.


      Alvaro also kindly assisted with other areas associated with our move to Spain.


      Jun 02, 2017
    • Uwe Gerhard
      Uwe Gerhard, Fuengirola

      Everything was done very well and on time.


      Alvaro was extremely helpful, he couldn't have done more.


      May 08, 2017
    • HEEC
      HEEC

      I am a lawyer myself and must have stormed Alvaro with thousands of questions. He immediately replied to all my queries. He is a really helpful and approachable person.


      I will not hesitate in recommending his service to anyone. If I have to rank him out of 10 he will get 9 for sure.


      Feb 08, 2017
    • Paul McG.
      Paul McG., Fuengirola

      He provided the help I needed in a professional!


      His manner and this help was well worth the fee. As I told Alvaro, if in the future I have any legal problems here he will be my first port of call.


      Dec 15, 2016
    • Abi Carr
      Abi Carr, Mijas Costa

      Alvaro assisted me through an extremely difficult and complex situation. At all times he was professional, reassuring and diligent, explaining anything I did not quite understand, and working tirelessly on my behalf.


      He kept me informed throughout, always responding to my calls and emails very quickly. Excellent service, and value for money. I highly recommend Alvaro. I would not hesitate to use him again.


      Oct 28, 2016
    • Caroline & Kevin
      Caroline & Kevin, UK

      Alvaro was approachable, reliable and his instructions were clear. He was easy to communicate with and we felt he had our best interests at heart.


      His English is excellent and he offered excellent value for money.


      Sep 02, 2016
    • Pamela Jakeway
      Pamela Jakeway, Carchel

      I am very satisfied with the service provided by Alvaro.


      He was very helpful with a good personality.


      Jul 14, 2016
    • Susan Carol
      Susan Carol, Thailand

      I was very satisfied with Alvaro.


      We could understand each other.


      Dealt with my difficult case extremely well. Pleasant manner.


      Jun 05, 2016
    • Andrew Brown
      Andrew Brown, Qatar

      Francisco is extremely helpful, couldn’t have done more.


      He is absolutely first class and professional service. Provided over and above all my requirements.


      May 25, 2016
    • JC
      JC, Hastings England

      We would recommend Alvaro as he provided us will invaluable help toward the purchase of our property, speaks very good English, and always kept us informed of matters.


      He was simply a fantastic link between us and the prurchaser and we will continue to use his services and would recommend him to anyone who is needing legal advice.


      Apr 21, 2016
    • Martin Rawlings
      Martin Rawlings, Baza

      I am very pleased with the time and trouble taken by Álvaro in advising me and acting on my behalf.


      His English was more or less fluent and I would definitely use his services again.


      Apr 07, 2016
    • George Denissoff
      George Denissoff, Granada

      Alvaro is very responsible, conscientious and professional.


      His help in handling our property purchase proved invaluable.


      We will gladly recommend him and use his services in the future!


      Feb 24, 2016

Criminal Law

Assault Charges

Who is this Service for?

Being accused with carrying-out an assault can result in a range of offences -from relatively minor charges to the most serious on the country’s statute books. In any case, the presence of an experienced criminal lawyer, who speaks your language, can be absolutely vital in determining the severity of any sentence or indeed receiving an acquittal

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • The lawyer will develop a defence strategy based on the facts of the case and the circumstances
  • Representation in local courts and advice throughout the trial

 

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Criminal Damage Charges

Who is this Service for?

A common offence among young people can be the possession of drugs. Such legal convictions can impact later life opportunities and it is important to deal with them with the appropriate level of seriousness. More serious offences involving the production and/or trafficking of prescribed drugs can result in the deprivation of liberty for considerable periods of time in a remote country, without local language abilities. Representation by an experienced criminal defence lawyer is absolutely vital to obtain the best result possible.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • The lawyer will develop a defence strategy based on the facts of the case and the circumstances
  • Representation in local courts and advice throughout the trial

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Defamation

Who is this Service for?

Depending on the amount of money involved, and the impact on any victims, this offence can attract a wide range of potential sentences, ranging from fines to long terms of imprisonment. A lawyer who can understand you and your role – if any – in the events that you are accused of undertaking is crucial to ensuring the best possible defence.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • The lawyer will develop a defence strategy based on the facts of the case and the circumstances
  • Representation in local courts and advice throughout the trial

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Drugs Offences

Who is this Service for?

A common offence among young people abroad is to be charged with possession - or the more serious offence of 'trafficking' - of drugs. Such legal convictions can impact later life opportunities and it is important to deal with them with the appropriate level of seriousness. More serious offences involving the production and/or trafficking of prescribed drugs can result in the deprivation of liberty for considerable periods of time in a remote country, without local language abilities. Representation by an experienced criminal defence lawyer is absolutely vital to obtain the best result possible.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • The lawyer will develop a defence strategy based on the facts of the case and the circumstances
  • Representation in local courts and advice throughout the trial

 

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Extradition

Who is this Service for?

Anyone may be detained pursuant to a warrant for their arrest issued by another country – most commonly in Europe under the auspices of the European Arrest Warrant. A successful defence can arise where the specific offence does not existing in the country where the individual is detained. Success can therefore require close collaboration between lawyers in both states.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • Development of your defence, including conferring with colleagues in the country seeking extradition, to determine if the offence charged is valid
  • Assessment of compliance of all regulations to determine if the authorities have complied

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Fraud or Theft Charges

Who is this Service for?

Depending on the amount of money involved, and the impact on any victims, this offence can attract a wide range of potential sentences, ranging from fines to long terms of imprisonment. A lawyer who can understand you and your role – if any – in the events that you are accused of undertaking is crucial to ensuring the best possible defence.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • The lawyer will develop a defence strategy based on the facts of the case and the circumstances
  • Representation in local courts and advice throughout the trial

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Road Traffic Offences

Who is this Service for?

One of the most common situations for English-speakers abroad is being stopped by the police for some type of infraction of the rules of the road. Such offences range from speeding to death by dangerous driving, so the sentences that can result are equally varied. Most important is having a lawyer who understands you and who will know how to mitigate any sentence that may be levied.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • Preparation of the defence/negotiation with the prosecutors
  • Representation in court – where required

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Sexual Offences

Who is this Service for?

There are now a wide range of sexual offences on the statute books and the way local courts handle such cases will vary from country to country. Obviously, it is important for anyone facing such charges to have an experienced criminal lawyer defend them and not only that, but a lawyer who can understand them, and explain their situation clearly to them and their legal options going forward.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • Preparation of the defence/negotiation with the prosecutors
  • Representation in court, if required

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Smuggling Offences

Who is this Service for?

A common offence in Europe is that of smuggling. The authorities are of course more and more keen to police national borders - especially as a result of the recent refugee crisis. Accordingly those who either are not aware of allowances relating to tobacco alcohol, or who flout the rules regardless, or who are in possession of more illicit contraband, will be increasingly subject to stop and search, with predictable results.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • The lawyer will develop a defence strategy based on the facts of the case and the circumstances
  • Representation in local courts and advice throughout the trial

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Tax Evasion Charges

Who is this Service for?

This is a specialist service aimed at anyone who is the subject of an investigation by the tax authorities for non-payment of due taxes. An experienced, specialist tax lawyer is required to be able to navigate this complex area and to be able to explain the options and consequences to their client.

What does this service consist of?

  • Discussion with an experienced English-speaking lawyer to determine the nature of the charges
  • Preparation of the defence/negotiation with the prosecutors
  • Representation in court, where required

 

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

Victim Representation

Who is this Service for?

In certain countries victims have a statutory right to be represented in the trial of the person(s) accused of committing a crime against them. In this regard, an English-speaking lawyer can be a great help in liaising with the court and keeping you up-to-date with progress and information regarding the trial.

What does this service consist of?

  • An initial discussion with an experienced English-speaking lawyer to understand your thoughts and concerns about the trial and the aftermath of the crime
  • Regular updates from the lawyer on the progress of the trial and explanation of the progress
  • Representation in court, where required

Code of Reasonable Fees

Our clients can expect to receive a quotation that is at or below the recommended guideline prices by our local Professional Body.

Free Support Services Included

When combined with the free and innovative Advocate Abroad support services you can be sure that you are obtaining completely transparent legal services from registered and regulated English-speaking lawyers abroad.These support services include:

  • Verification of the regulatory status of your lawyer.
  • Fees as recommended by the Local Professional Body
  • Fees specified in advance and legally guaranteed.
  • Service levels agreed in advance and guaranteed.
  • All professionals must hold professional indemnity insurance.
  • Professionals' proficiency in English monitored.
  • Continuous quality controls and reviews.

30 Lawyers Offering Services in Spain

Send Your Enquiry
Are there public holidays?

Enquiry sent. Thank you!

Please fix errors