Made corrections based on Martins comment