Fixes bug with initializing