Fixed cast to int from boolean