Fixed two invalid pieces of code