Fixed some minor issues (static analysis)