Fix instance variable not defined warning
Fix ambiguous expression warning