Fixed huge bitdepth bug