Fix the add work to gallery bug