Fixed warnings, not sure if this will still work though