Fixes made so no more crash