Fixed the same error throughout the entire controller