Small fixes to prevent errors