Fixed the code slightly