Fixed cast error + Fixed files equality problems.