Removed bugs that led to error messages

Functions should work now