Fixed magic number issues