Fixed last commit's bugs.