fixed final magic stuff