Fixed bug with case