Fixed errors with ruby's handlers